package cn.com.czpb.client.module.subscribe.view;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import cn.com.czpb.client.R;
import cn.com.czpb.client.utils.PageCtrl;

/**
 * Created by 猪猪侠 on 2017/8/11.
 */

public class SubscribeEmptyView implements View.OnClickListener {

    private Activity mActivity;
    private View root;

    public SubscribeEmptyView(Activity mActivity) {
        this.mActivity = mActivity;
        initView();
    }

    public View getView(){
        return root;
    }


    public static SubscribeEmptyView instance(Activity activity){
        return  new SubscribeEmptyView(activity);
    }

    /**
     * 加载布局
     */
    private void initView() {
        LayoutInflater inflater = mActivity.getLayoutInflater();
        root = inflater.inflate(R.layout.view_subscribe_empty,null);
        TextView tv_tosubscribe_id = root.findViewById(R.id.tv_tosubscribe_id);
        tv_tosubscribe_id.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.tv_tosubscribe_id:
                PageCtrl.start2SubscribeMoreActivity(mActivity);
                break;
        }
    }
}
